package com.lemurian.bankdata.bean.base;

import java.util.List;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;

import com.lemurian.bankdata.lite.struts.PartialList;

public interface BaseServiceInterface<T> {
	
	public void delete(T entity);
	
	public void delete(int id);
	
	public int delete(String sql);
	
	public List<T> findAll();
	
	public List<T> findAll(Order order);
	
	public T findById(int id);
	
	public T load(int id);

	public T save(T entity);
	
	public T update(T entity);
	
	public List<T> findByCriteria(Order order, Criterion... criterion);

	public PartialList<T> findByCriteria(int start, int count, Order order, Criterion... criterion);
	
	public T findByCriteria(Criterion... criterion);

}
